﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>条码包含的水洗标记录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/Content/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/Content/X-admin/lib/layui/layui.js"></script>
    <link href="~/Content/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/Content/X-admin/js/jquery.min.js"></script>
    <script src="~/Content/X-admin/js/xadmin.js"></script>
    <script src="~/Content/Scripts/System/systemFrame.js"></script>
    <script src="~/Content/Scripts/System/Common.js"></script>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">

                    <form class="layui-form layui-col-space5" name="qForm" id="qForm">
                        <input type="hidden" name="barCode" id="barCode" />
                    </form>
                    <div class="layui-card-body layui-table-body layui-table-main">
                        <table class="layui-hide" id="list" lay-filter="list"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>

<script>

    function loadData() {
        layui.use('table', function () {
            var conditon = JSON.stringify(FormToJson("qForm"));
            var table = layui.table;
            table.render({
                elem: '#list'
                , cols: [[ //标题栏
                    { field: 'id', title: 'ID', width: 80 }
                    , { field: 'barCode', align: 'center',title: '条码', width: '10%' }
                    , { field: 'proCode', align: 'center', title: '存货编码', width: '10%', }
                    , { field: 'proName', align: 'center', title: '存货名称', width: '12%' }
                    , { field: 'number', align: 'center', title: '数量', width: '8%' }
                    , { field: 'waterWashCode', align: 'center', title: '水洗标号', width: '11%' }
                    , { field: 'color', align: 'center', title: '颜色', width: '8%' }
                    , { field: 'trademark', align: 'center', title: '商标', width: '8%' }
                    , { field: 'customerName', align: 'center', title: '客户名称', width: '12%' }
                    , { field: 'createuser', align: 'center', title: '装箱人员', width: '10%' }
                    , { field: 'createtime', align: 'center', title: '装箱时间', width: '11%' }
                ]], done: function (res, curr, count) {
                    $("[data-field='id']").css('display', 'none');//隐藏列
                }

                , url: "../Bar/GetDataList?dataType=waterWash&condition=" + conditon
                , skin: 'row' //表格风格
                , even: true
                , page: false //是否显示分页
                , limits: [10, 15, 20]
                , limit: 10 //每页默认显示的数量
            });
        });

    }
    $(function () {
        var dataId = getUrlVariable("barCode");
        if (dataId != undefined && dataId != "") {
            $("input[ name='barCode']").val(dataId);
            loadData();
        }
    })
</script>